Navigation

Getting Clean via Emergent Design

simple design…

  1. runs all tests
  2. contains no duplication
  3. expresses intent of the programmer
  4. minimizes number of classes and methods

Simple Design Rule 1: Runs All the Tests

The more testable a system is, the better; SRP facilitates this.

Simple Design Rules 2-4: Refactoring

With tests, you can safely refactor

No Duplication

DRYing even small sections of code can reveal violations of SRP

Expressive

Minimal Classes and Methods

avoid pointless dogmatism